package kr.hkit.powerjava.chapter07.selfstudy;

class Updator {
	public void Update (Counter Conunter) {
		Counter.count++;
	}
}

public class Counter {
	static int count = 0;
	
	public static void main(String[] args) {
		Counter myCounter = new Counter ();
		System.out.println("before update: " + myCounter.count);
		Updator myUpdator = new Updator ();
		myUpdator.Update (myCounter);
		System.out.println("after update: " + myCounter.count);
	}
}
